import { VxeGridPropTypes } from "vxe-table/types/grid";
import XEUtils from 'xe-utils';

export const columns: VxeGridPropTypes.Columns = [
  {type: 'checkbox', width: 50, fixed: 'left',},
  {type: 'seq', title: '序号', treeNode: true, width: '100',},
  // {field: 'ID', title: 'ID', width: 'auto', visible: false,},
  {field: 'name', title: '分类名称', sortable: false, minWidth: 160,},
  {field: 'icon', title: '图标', sortable: false, width: 90, cellRender: {name: 'GoodsCateIcon',}},
  {field: 'enable', title: '启用', sortable: false, width: 50, formatter: 'formatEnable',},
  {field: 'sort', title: '顺序', sortable: false, width: 80,},
  {field: 'memo', title: '备注', visible: true, sortable: false, minWidth: 150,},
  {field: 'CreatedTime', title: '创建时间', visible: false, sortable: false, width: 160,
  formatter ({ cellValue }) {
    return XEUtils.toDateString(cellValue,)
  }},
  {field: 'UpdatedTime', title: '更新时间', visible: false, sortable: false, width: 160,
  formatter ({ cellValue }) {
    return XEUtils.toDateString(cellValue,)
  }},
];